home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
prog_c
/
malloc15.zip
/
README.TXT
< prev
next >
Wrap
Text File
|
1996-04-18
|
3KB
|
62 lines
Nigel Horne's malloc C. All output is via cprintf\cputs.
To use just link the required object file for the memory model into your
application.
For the best results you should include mem.h in each source file and
recompile.
This is not a wrapper for the standard malloc, but features a complete drop
in replacement.
Version 1.5.
DOS:
Suitable for MSC8.00c (a.k.a. MSVC 1.5)
usage: cl /AS test.c dosmems.obj /link /noe
The test.c program is a program full of errors and is an example of the type
common errors that the package traps. They are not examples of how to
modify your code! So try compiling as in the example and you'll see some
error messages appear - these are the incorrect program lines in test.c which
the package has noticed and is telling you. It's an example only.
Now copy dosmem?.obj and mem.h to your source directory, add #include "mem.h"
to all of your .c files, ensure that dosmem?.obj (where ? is the memory
model you're using) is linked in and voila, the memory package has been
included in your program, so if yours has any errors similar to that in
test.c you'll see them. All error messages go to stderr.
Choose the correct .obj for the modem you're using dosmemS.obj is suitable for
both small and tiny models.
SCO Unix:
Contains mem.o which you should link with your application,
and mem.h which you can optionally include in each .c file. This would be
the best action as then mem.o will be better at finding which file has
gone wrong. The included test.c shows some common problems. To test all
is well I suggest you try "cc test.c mem.o -link -z" and see look at the
output. Do not link with the shared library "-lc_s" option, as this will
cause conflicts with the library.
This has been tested on SCO3.2v4.2 with both the standard development system
and with gcc version 2.7.0.
HP\UX:
As SCO Unix.
This is compiled for an HP9000/827 running HPUX A.08.02E.
SunOS:
mem.o was compiled using gcc version 2.7.0 on sunos 4.1.4. If you're using
gcc remember that it puts some functions inline.
AIX:
You do not want builtins. Use
cc -O2 -roconst -U__STR__ -qlanglvl=ansi *.c
See also mem.h.
Internet: njh@smsltd.demon.co.uk; Fidonet: Nigel Horne @ 2:2502/21.10;
Packet: G0LOV@GB7SYP.#19.GBR.EDU; Phone: +44-1226-283021.
This is shareware. Registration for personal use costs only #10 sterling and
is available from J. Bailey, 8 Hild Ave. Cudworth, Barnsley, S. Yorks.
For information regarding corporate licencing please contact the author.
Upon registration you'll receive a free upgrade and support.